package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.dto.ElderDeviceDto;
import com.zzyl.nursing.service.INursingProjectService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:zhq
 * @Date: 2025/08/21 20:43
 * @Description:
 */
@RestController
@RequestMapping("/member/orders")
public class MemberOrdersController {
    @Autowired
    private INursingProjectService nursingProjectService;

    @ApiOperation("查询项目列表")
    @GetMapping("/project/page")
    public TableDataInfo<NursingProject> pageQuery(ElderDeviceDto elderDeviceDto){
        return nursingProjectService.pageQuery(elderDeviceDto);
    }

    @ApiOperation("查询项目详情")
    @GetMapping("/project/{id}")
    public AjaxResult getProjectById(@PathVariable Integer id){
         return AjaxResult.success(nursingProjectService.selectNursingProjectById(Long.valueOf(id)));
    }


}
